namespace SmartPeople.Framework.SecuritySpace
{
    public sealed class SecuritySecuredTypes : ISecuritySecuredTypeProvider
    {
        private ISecuritySecuredTypeProvider provider;


        //TODO:Check if working???
        public int Count
        {
            get { return Provider.Count; }
        }

        public SecuritySecuredTypes(ISecuritySecuredTypeProvider provider)
        {
            this.provider = provider;
        }

        private ISecuritySecuredTypeProvider Provider
        {
            get { return provider; }
            set { provider = value; }
        }

        #region CreateType(string typeName)

        public ISecuritySecuredType CreateType(string typeName)
        {
            return Provider.CreateType(typeName);
        }

        #endregion

        #region CreateType(string typeName, string baseTypeName)

        public ISecuritySecuredType CreateType(string typeName, string baseTypeName)
        {
            return Provider.CreateType(typeName, baseTypeName);
        }

        #endregion

        #region CreateType(string typeName, ISecuritySecuredType baseSecuredType)

        public ISecuritySecuredType CreateType(string typeName, ISecuritySecuredType baseSecuredType)
        {
            return Provider.CreateType(typeName, baseSecuredType);
        }

        #endregion

        #region GetSecuredType(string securedTypeName)

        public ISecuritySecuredType GetSecuredType(string securedTypeName)
        {
            return Provider.GetSecuredType(securedTypeName);
        }

        #endregion

        #region GetAllSecuredTypes

        public ISecuritySecuredType[] GetAllSecuredTypes()
        {
            return Provider.GetAllSecuredTypes();
        }

        #endregion

        #region UpdateSecuredType

        public void UpdateSecuredType(ISecuritySecuredType securedType)
        {
            Provider.UpdateSecuredType(securedType);
        }

        #endregion

        #region SecuredTypeExists

        public bool SecuredTypeExists(string securedTypeName)
        {
            return Provider.SecuredTypeExists(securedTypeName);
        }

        #endregion

        #region DeleteSecuredType

        public bool DeleteSecuredType(string securedTypeName, bool deleteAllRelatedData)
        {
            return Provider.DeleteSecuredType(securedTypeName, deleteAllRelatedData);
        }

        #endregion

        #region Clear

        public void Clear()
        {
            Provider.Clear();
        }

        #endregion
    }
}